<?php
include_once("../common.php");

if(! isVisitor() && isset($_GET['name']) && sizeof($_GET['name'])){
	$c = connect();
	$r = mysql_query("SELECT username FROM users WHERE username LIKE '".$_GET['name']."%'");
	$res = array();
	while($row = mysql_fetch_assoc($r))
		array_push($res, $row['username']);
	echo implode(",", $res);
	mysql_close($c);
}
?>
